package com.woniu.util;

//返回状态码的枚举：会被翻译成静态常量

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ResEnum {
    SUCCESS(200,"OK"),
    FAIL(2000,"FAIL"),
    LOGIN_SUCCESS(2001,"登录成功！"),
    LOGIN_FAIL(2002,"登录失败！"),
    NO_AUTH(2003,"没有权限！"),
    NO_LOGIN(2004,"未登录！")
    ;

    private Integer code;
    private String msg;

    public static void main(String[] args) {
        System.out.println(ResEnum.SUCCESS);
        System.out.println(ResEnum.SUCCESS.code);
    }
}
